package com.demo2do.boyle.common.entity.aduser;

import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import com.demo2do.core.web.format.PersistentFormat;

/**
 * 
 * @author downpour
 */
public class Profile {
	
	private String userName;
    
    /** 昵称 */
    private String nickName;
    
    /** 广告主级别 */
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @PersistentFormat(key = Integer.class)
    private AduserLevel aduserLevel;
    
    /**
     * the default constructor
     */
    public Profile() {
    	
    }
    
    /**
     * @param aduserLevel
     */
    public Profile(AduserLevel aduserLevel) {
    	this.aduserLevel = aduserLevel;
    }
    
    /**
     * 
     * @param aduserLevel
     * @return
     */
    public Profile initialize(AduserLevel aduserLevel) {
    	this.aduserLevel = aduserLevel;
    	return this;
    }

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @return the nickName
	 */
	public String getNickName() {
		return nickName;
	}

	/**
	 * @return the aduserLevel
	 */
	public AduserLevel getAduserLevel() {
		return aduserLevel;
	}

	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @param nickName the nickName to set
	 */
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	/**
	 * @param aduserLevel the aduserLevel to set
	 */
	public void setAduserLevel(AduserLevel aduserLevel) {
		this.aduserLevel = aduserLevel;
	}
    
}
